Skip to main content

Standard Checkout

Start by initializing the transaction from your backend. This approach gives you complete control over the transaction data. Simply send a POST request to the Initialize Checkout API endpoint from your server to begin the process:

Parameter Description​

NameDescription
amountThe amount to charge the customer.
customerEmailCustomers Email required
firstName & lastNameCustomer first and last name, this value is required
customerPhoneNumberCustomer phone number, this value is optional
successRedirectUrlThe URL to redirect the customer to after payment is done.
public_keyYour Paylode public key required
curl -X 'POST' \
'https://pgmerchantsapi.paylodeservices.com/api/v1/checkout' \
-H 'accept: application/json' \
-H 'public-key: PUBLIC_KEY' \
-H 'Content-Type: application/json' \
-d '{
"amount": 200,
"customerEmail": "[email protected]",
"firstName": "first_name",
"lastName": "last_name",
"customerPhoneNumber": "08112312343",
"description": "testing",
"failureRedirectUrl": "https://redirect.com",
"metadata": "string",
"successRedirectUrl": "https://successpage.com"
"reference": "string"

}'

You will get a success response like this:

{
"data": {
"checkoutId": "bfe8191b13c246269bfe443ac98d32c3",
"checkoutUrl": "https://paylodeservices.com/checkout?ref=3e4a667ff36840e1bcbd5cffd77bb683"
},
"isSuccessful": true,
"message": "Checkout created successfully",
"responseCode": "201",
"errors": []
}

Important notes​

  • The publicKey field here takes your Paylode public key on the merchant dashboard.
  • The amount should be in the subunit of the supported currency.
  • It's ideal to generate a unique reference from your system for every transaction to avoid duplicate attempts.

Redirect Your Customer to Complete Payment​

Once the transaction is initialized, redirect your customer to the URL returned in data.checkoutUrl. This will open our secure checkout modal where they can complete their payment.

After Payment Completion​

Once the payment is successful, here’s what happens next:

  • Your customer is redirected to your redirect_url with status, and transaction_id as query parameters.

  • A webhook is triggered (if enabled) to notify your backend.

  • A receipt email is sent to the customer (unless disabled).

  • You receive a notification email (unless disabled).